﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sinacor.Infra.Common;
using Sinacor.Infra.UI.Common;
using Sinacor.UI.Bovespa.Ordens.Communication.Bovespa.Custodia.Custodia;
using System.ComponentModel;

namespace Sinacor.UI.Bovespa.Ordens.Communication.Translator
{
    class TranslatorCustodiaOrdem :
    BaseTranslator<Model.Custodia,
    CustodiaResponse,
    ModelCollection<Model.Custodia>,
    List<CustodiaResponse>>
    {
        public override Model.Custodia Translate(CustodiaResponse from)
        {
            Model.Custodia to = new Model.Custodia();
            if (from != null)
            {
                to.Titulo = from.Titulo;
                to.Carteira = from.Carteira;
                to.Disponivel = from.Disponivel;
                to.Negociavel = from.Negociavel;
                to.Projetado = from.Projetado;
                to.NegociosDia = from.NegociosDia;
                to.NegExecutar = from.NegocioExecutar;
                to.Ant102004 = from.Anterior102004;
                to.Custo = from.Custo;
                to.ValorAtual = from.ValorAtual;
                to.Variacao = from.Variacao;
                to.isContaInvestimento = from.isContaInvestimento;
            }
            return to;
        }
    }
}
